﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MC.RideEventMVC.Models;

namespace MC.RideEventMVC.Controllers
{
    public class EventController : Controller
    {
        private IEventRepository _repoEvent;

        public EventController()
        {
            _repoEvent = new EventRepository();
        }

        public ActionResult Index()
        {
            return View();
        }

        /// <summary>
        /// This method display the result
        /// of a research client action.
        /// </summary>
        /// <param name="text"></param>
        /// <param name="dateEvent"></param>
        /// <returns></returns>
        [HttpPost]
        public ActionResult Index(string text, DateTime dateEvent)
        {
            _repoEvent.ResearchEvents(text, dateEvent);
            return View();
        }

        public ActionResult View1()
        {
            return View();
        }

        public ActionResult _ResearchHome()
        {
            return PartialView();
        }
    }
}
